package cn.xluobo.business.wechat.miniapp.report.controller;

import cn.xluobo.business.wechat.miniapp.report.domain.resp.RespMineTopValue;
import cn.xluobo.business.wechat.miniapp.report.service.WechatMiniReportService;
import cn.xluobo.core.api.APIResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：KingLong
 * @date ：Created in 2020/10/22 21:30
 */
@RestController
@RequestMapping("/api/wechat/miniapp/{appId}/report")
public class WechatMiniReportController {

    @Autowired
    private WechatMiniReportService wechatMiniReportService;

    /**
     * 我的页面顶部指标
     * @return
     */
    @GetMapping("/mineTopValue")
    public APIResponse mineTopValue() {
        RespMineTopValue respMineTopValue = wechatMiniReportService.mineTopValue();
        return APIResponse.toAPIResponse(respMineTopValue);
    }
}
